-- GENERATED SPELL FOR [Taneel Darkwood] --


function spell0_3940(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(6063,pUnit)
pUnit:RegisterEvent('Sorts_3940', 3000, 1)
end

function spell1_3940(pUnit, Event) --@Renew,n/a--
pUnit:FullCastSpellOnTarget(6077,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3940', 15000, 1)
end

function spell2_3940(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(2767,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3940', 18000, 1)
end

function Sorts_3940(pUnit, Event)
local choix_sorts_3940 = math.random(0, 2)
if choix_sorts_3940 == 0 then
pUnit:RegisterEvent('spell0_3940', 1, 1)
end
if choix_sorts_3940 == 1 then
pUnit:RegisterEvent('spell1_3940', 1, 1)
end
if choix_sorts_3940 == 2 then
pUnit:RegisterEvent('spell2_3940', 1, 1)
end
end

function mob3940_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3940', math.random(1500, 3000), 1)
end

function mob3940_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3940_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3940_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3940, 1, 'mob3940_Action')
RegisterUnitEvent(3940, 2, 'mob3940_Leave')
RegisterUnitEvent(3940, 3, 'mob3940_Kill')
RegisterUnitEvent(3940, 4, 'mob3940_Die')
